﻿using System;
using Microsoft.EntityFrameworkCore.Migrations;

#nullable disable

namespace AdminSystem.EntityFrameworkCore.Migrations
{
    public partial class initDb1 : Migration
    {
        protected override void Up(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.CreateTable(
                name: "Admins",
                columns: table => new
                {
                    AdminId = table.Column<int>(type: "int", nullable: false)
                        .Annotation("SqlServer:Identity", "1, 1"),
                    UserName = table.Column<string>(type: "nchar(50)", fixedLength: true, maxLength: 50, nullable: false),
                    Password = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: false),
                    Gender = table.Column<int>(type: "int", nullable: false),
                    CreateName = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: true),
                    CreateTime = table.Column<DateTime>(type: "datetime2", nullable: false),
                    ModifyName = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: true),
                    ModifyTime = table.Column<DateTime>(type: "datetime2", nullable: true),
                    IsDeleted = table.Column<bool>(type: "bit", nullable: false),
                    DeletedName = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: true),
                    DeletedTime = table.Column<DateTime>(type: "datetime2", nullable: true)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_Admins", x => x.AdminId);
                });

            migrationBuilder.InsertData(
                table: "Admins",
                columns: new[] { "AdminId", "CreateName", "CreateTime", "DeletedName", "DeletedTime", "Gender", "IsDeleted", "ModifyName", "ModifyTime", "Password", "UserName" },
                values: new object[] { 1, "张三", new DateTime(2024, 12, 30, 10, 29, 18, 21, DateTimeKind.Local).AddTicks(8663), null, null, 1, false, null, null, "734043dc17df48029c452ba3db70f7b9", "Admin" });

            migrationBuilder.InsertData(
                table: "Admins",
                columns: new[] { "AdminId", "CreateName", "CreateTime", "DeletedName", "DeletedTime", "Gender", "IsDeleted", "ModifyName", "ModifyTime", "Password", "UserName" },
                values: new object[] { 2, "李四", new DateTime(2025, 1, 4, 10, 29, 18, 21, DateTimeKind.Local).AddTicks(8816), null, null, 0, false, null, null, "26351fa4ef3c46a69c977b4768abb148", "lisi" });
        }

        protected override void Down(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.DropTable(
                name: "Admins");
        }
    }
}
